import { Router } from "jsr:@oak/oak/router";
import { authMiddleware } from "../middleware/authMiddleware.ts";
import type { ApiResponse } from "../shared/types.ts";

const router = new Router();

router.get("/api/auth/verify", authMiddleware, (ctx) => {
  const response: ApiResponse<{ user: typeof ctx.state.user }> = {
    success: true,
    data: { user: ctx.state.user }
  };
  
  ctx.response.body = response;
});

export default router; 